<?php
require_once 'mysql.php';

// 配置连接参数
$config = [
    'host' => 'localhost',
    'username' => 'username',
    'password' => 'password',
    'dbname' => 'projectDB'
];

// 连接数据库
$mysql = new mysql();

$mysql->connect($config);

$table = ['fatherclass'];
$field = ['id', 'name'];
$where = 'id=2';

$result = $mysql->select($table);

while ($row = mysqli_fetch_assoc($result)) {
    echo $row['fathername'] . '<br/>';
}

// print_r($mysql->fetchAll());
// echo $result;
